﻿/*=================================================================
* 版权信息：Copyright (C) 2005-2011 捷点科技 All Rights Reserved.
* 文件名称：CNVP_AdminRoleMenu.cs
* 创建标识：曾乃强 15158756652 2011-04-11 09:04:55
* 修改标识：
* 功能描述：业务层
===================================================================*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using CNVP.Framework.Helper;

namespace CNVP.JShop.BLL 
{
    /// <summary>
    /// 对*CNVP_AdminRoleMenu*操作(针对业务层)的实现
    /// </summary>
    public class CNVP_AdminRoleMenu
    {
        DAL.CNVP_AdminRoleMenu dal = new DAL.CNVP_AdminRoleMenu();
        
        #region BLL
        #region 添加
        /// <summary>
        /// 添加
        /// </summary>
        public int Add_CNVP_AdminRoleMenu(Model.CNVP_AdminRoleMenu obj)
        {
            return dal.Insert(obj);
        }
        #endregion
        
        #region 删除
        /// <summary>
        /// 删除
        /// </summary>
        public int Delete_CNVP_AdminRoleMenu(Model.CNVP_AdminRoleMenu obj)
        {
            return dal.Delete(obj);
        }
        
        /// <summary>
        /// 删除,生成列的主键列构成的参数列表
        /// </summary>
        public int Delete_CNVP_AdminRoleMenu(int AdminRoleID)
        {
            return this.Delete_CNVP_AdminRoleMenu(new Model.CNVP_AdminRoleMenu() {

                AdminRoleID = AdminRoleID
            });
        }
        #endregion 
        
        /// <summary>
        /// 查看单个
        /// </summary>
        public Model.CNVP_AdminRoleMenu GetSingle_CNVP_AdminRoleMenuById(int ID)
        {
            return dal.LoadById(ID);
        }
        /// <summary>
        /// 查看全部
        /// </summary>
        public List<Model.CNVP_AdminRoleMenu> GetAll_CNVP_AdminRoleMenu(string sqlWhere)
        {
            return dal.LoadAll(sqlWhere);
        }
        /// <summary>
        /// 查看全部
        /// </summary>
        public List<Model.CNVP_AdminRoleMenu> GetAll_CNVP_AdminRoleMenu()
        {
            return this.GetAll_CNVP_AdminRoleMenu("");
        }
        #endregion
        
        /// <summary>
        /// 查看全部
        /// </summary>
        public List<Model.CNVP_AdminRoleMenu> GetAdminRoleID_CNVP_AdminRoleMenuByMenuID(int MenuID)
        {
            return dal.LoadAdminRoleIDByMenuID(MenuID);
        }

    }
}

